#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;
class Linked_list
{
    public:
        Linked_list();
        void li_insert(int x);
        void li_delete(int id);
        void li_print();
    private:
        struct node
        {
            int value;
            node *next;
        }*start;
};
Linked_list::Linked_list()
{
    this->start=(node *)malloc(sizeof(node));
    this->start->next=NULL;
    this->start->value=-1;
}
void Linked_list::li_insert(int x)
{
    node *p=this->start;
    while(p->next!=NULL)
    {
        p=p->next;
    }
    node *new_node=(node *)malloc(sizeof(node));
    new_node->value=x;
    p->next=new_node;
}
void Linked_list::li_delete(int id)
{
    int cnt=0;node *p=this->start,*q;
    while(p!=NULL)
    {
        q=p;
        p=p->next;
        cnt++;
        if(cnt==id&&p!=NULL){
            q->next=p->next;
            free(p);
            break;
        }
    }
    if(p==NULL)
    {
        printf("Out Value!\n");return;
    }
    else printf("Sueecss!\n");
}
void Linked_list::li_print()
{
    node  *p=this->start;
    while(p!=NULL)
    {
        p=p->next;
        if(p!=NULL)
            cout<<p->value<<' ';
    }
}
int main()
{
    int n,va;
    Linked_list t;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>va;
        t.li_insert(va);
    }
    int delete_id;
    cin>>delete_id;
    t.li_delete(delete_id);
    t.li_print();
    return 0;
}